﻿import pygame
from pygame.locals import *

from MainMenu import *
from SplashScreen import *
from About import *
from SelectPart import *
from GamePartOne import *
from TestScene import *

import GameData

class Application:
	def __init__(self):
	
		
		self.part_1_open = True;
		
		self.part_2_open = True;
		
		self.part_3_open = False;
	
		self.clock = pygame.time.Clock()
		self.milli = 0.0
		self.seconds = 0.0#create window
	
		pygame.init()
		
		
		
		
		
		print "loading font"
		self.test_font = pygame.font.Font("data/fonts/font.ttf",20)
		# fps timers
		
		self.size = (640, 480)
		self.screen = pygame.display.set_mode(self.size,pygame.DOUBLEBUF,32)
		pygame.display.set_caption("NoNe - PyWeek 13")
		self.windows_bgcolor = (127,127,127)
		self.mainLoop = True
		self.sceneNum = 1
		
		
		self.SetCurrentScene(5)
		
		
	def SetCurrentScene(self, num_scene):
		if num_scene == 1:
			self.currentScene = SplashScreen(self,self.screen)
		elif num_scene == 2:
			self.currentScene = MainMenu(self,self.screen)
		elif num_scene == 3:
			self.currentScene = About(self,self.screen)
		elif num_scene == 4:
			self.currentScene = SelectPart(self,self.screen)
		elif num_scene == 5:
			self.currentScene = GamePartOne(self,self.screen)
		elif num_scene == 6:
			self.currentScene = TestScene(self,self.screen)

	def main(self):
		while self.mainLoop:
			self.currentScene.Update()
			self.milli = self.clock.tick(60)
			self.seconds = self.milli / 1000.0
		pygame.quit()
		
	def SetOverCursor(self):
		pass
	
	def SetArrowCursor(self):
		pass